import { getRepTemplateList } from '@/api/selfStudy/courseExp.js';
export default {
    data() {
        return {
            replaceList: [],
            replaceTotal: 0,
            replaceCol: [
                {
                    title: '新模板ID	',
                    key: 'newTempl'
                },
                {
                    title: '原模板ID',
                    key: 'oldTempl'
                },
                {
                    type:"showTime",
                    title: '替换时间',
                    key: 'createTime'
                }
            ],
            queryReplaceInfo: {
                pageIndex: 1,
                pageSize: 10,
                ecId: ''
            },
            environStepFinishStatus: false
        };
    },
    computed: {},
    mounted() {},
    methods: {
        getRepTemplateList() {
            if (!this.ecid) {
                return;
            }
            this.queryReplaceInfo.ecId = this.ecid;
            getRepTemplateList(this.queryReplaceInfo)
                .then((data) => {
                    if (data.code == 1) {
                        this.replaceList = data.data.items;
                        this.replaceTotal = data.data.total;
                        this.environStepFinishStatus = this.replaceTotal > 0;
                    } else {
                        // this.$Message.error(data.message);
                    }
                })
                .catch((error) => {
                    console.log(error);
                });
        }
    }
};
